x86: Clean up vpt-align patch.
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 13 Feb 2009 09:48:56 +0000 (09:48 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 13 Feb 2009 09:48:56 +0000 (09:48 +0000)
Also disable by default if not specified in domain config. Otherwise
the feature would be incorrectly enabled for old saved domain images.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/vpt.c

index 517dbb33e88793f1718f666c29319a7273dd149c..ae4acb378704b3d358a66def3d16e2822979a435 100644 (file)
@@ -311,7 +311,6 @@ int hvm_domain_initialise(struct domain *d)
     hvm_init_guest_time(d);
 
     d->arch.hvm_domain.params[HVM_PARAM_HPET_ENABLED] = 1;
-    d->arch.hvm_domain.params[HVM_PARAM_VPT_ALIGN]    = 1;
 
     hvm_init_cacheattr_region_list(d);
 
index 33f2400a0eefe3066ac4e1233ab99fa022f9bf7c..fe4ec99129e9f1647fa25a4318c05326436e2435 100644 (file)
@@ -384,17 +384,23 @@ void create_periodic_time(
     pt->period_cycles = (u64)period;
     pt->one_shot = !period;
     pt->scheduled = NOW() + delta;
-    /*
-     * Offset LAPIC ticks from other timer ticks. Otherwise guests which use
-     * LAPIC ticks for process accounting can see long sequences of process
-     * ticks incorrectly accounted to interrupt processing.
-     */
+
     if ( !pt->one_shot )
     {
         if ( v->domain->arch.hvm_domain.params[HVM_PARAM_VPT_ALIGN] )
+        {
             pt->scheduled = align_timer(pt->scheduled, pt->period);
+        }
         else if ( pt->source == PTSRC_lapic )
+        {
+            /*
+             * Offset LAPIC ticks from other timer ticks. Otherwise guests
+             * which use LAPIC ticks for process accounting can see long
+             * sequences of process ticks incorrectly accounted to interrupt
+             * processing (seen with RHEL3 guest).
+             */
             pt->scheduled += delta >> 1;
+        }
     }
 
     pt->cb = cb;